<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css color 字体颜色</title>
</head>
<body>

    <h1>default</h1>
    <hr>

    <h1 style="color: red">color_name</h1>
    <h1 style="color: #00ff00">hex_number</h1>
    <h1 style="color: rgb(0,255,0)">rgb_number</h1>
    <!-- 从父元素继承颜色 -->
    <h1 style="color: inherit">从父元素继承颜色</h1>
</body>
</html>